import API_PREFIX from './config'
import Mock from 'mockjs'

export default [
  {
    // 获取table数据api
    url: `${API_PREFIX}/m1/getTableData`,
    method: 'get',
    response: (req) => {
      return Mock.mock({
        errcode: 0,
        errmsg: '操作成功',
        sysErrMsg: null,
        'result|50': [
          {
            inspectionId: '@integer(3,1000000)',
            eleContractNo: '@string(3,50)',
            'title|1-20': '@ctitle',
            cityName: '@city',
            'payType|1-10': 100,
            'inspectionType|1': ['ELEVATOR', 'ESCALATOR'],
            userName: '@cname',
            inspectionDate: '@date(yyyy-MM-dd)',
            'orderCode|1': ['INITIATED', 'CHANGE_REQUEST', 'INSPECTION_AUDIT', 'COMPLETE'],
          },
        ],
        total: 100,
      })
    },
  },
]
